package com.bingo.facadeImpl;


import ibatis.Users;

import java.util.List;

import com.bingo.dao.UsersDAO;
import com.bingo.facade.IusersFacade;

public class UsersFacadeImpl extends FacadeImpl implements IusersFacade {
	private UsersDAO usersDao;

	public UsersDAO getUsersDao() {
		return usersDao;
	}

	public void setUsersDao(UsersDAO usersDao) {
		this.usersDao = usersDao;
	}
	/**
	 * @return 
	 */
	public List getAllUsers() throws Exception {
		return this.usersDao.getAll();
	}

	public Users getUserById(Integer id) throws Exception {
		return (Users)this.usersDao.select("users.getUserById", id);
	}

	public Users getUserByName(String name) throws Exception {
		return (Users)this.usersDao.getUserByName(name);
	}	
}
